
import React, { PureComponent } from 'react';


class PureComponentPage extends PureComponent {
    constructor(props){
      super(props);
      this.state = {
          count:0,
          obj: {num:0}
      }
    }
    setCount = () => {
        // PureComponent 浅比较
        this.setState({count:100,obj:{num:1000}})
    }
    render() {
        console.log("render")
        const {count} = this.state
        return (
            <div>
                <h3>PureComponentPage</h3>
                <button onClick={this.setCount}>{count}</button>
            </div>
        );
    }
}


export default PureComponentPage;
